<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
	template="/template/formLayout.xhtml">
<ui:param name="nomeDoForm" value="Principal" />

<ui:define name="content">
<rich:modalPanel id="modalPanel" showWhenRendered="#{!myIdentity.selectedProduct}" autosized="true">
       <f:facet name="header">
			<h:outputText value="Abrir Projeto" />
		</f:facet>
        <a:form>
         <rich:dataTable id="dataTable"
				value="#{lookupControllerBean.allProductActive}" rows="10" var="product"
				width="50%"
				onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
				onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">

				<rich:column>
					<f:facet name="header">
						<h:outputLabel style="font-weight:bold;">Nome</h:outputLabel>
					</f:facet>
                        #{product.name}
                </rich:column>

				<rich:column style="text-align:center;">
					<f:facet name="header">
						<h:outputLabel style="font-weight:bold;">Selecionar</h:outputLabel>
					</f:facet>
					<h:commandLink 	style="border:none;" action="#{myIdentity.setProduct(product)}" oncomplete="javascript:Richfaces.hideModalPanel('modalPanel')">
						<h:graphicImage value="/imagens/passed.gif" style="border:none;"></h:graphicImage>
					</h:commandLink>
				</rich:column>
			</rich:dataTable>
			<rich:spacer height="20"/>
			<h:commandButton action="#{myIdentity.selectProduct(true)}" value="Fechar" oncomplete="javascript:Richfaces.hideModalPanel('modalPanel')" />
        </a:form>
</rich:modalPanel>
	
</ui:define>

         
</ui:composition>